#include <iostream>
using namespace std;

// 关系运算符重载

class Person
{
// friend ostream &operator<<(ostream &cout, MyInteger myint);
public:

    Person (string name, int age)
    {
        m_Name = name;
        m_Age  = age;
    }

    // 重载 == 号
    bool operator==(Person &p)
    {
        if (this->m_Age == p.m_Age && this->m_Name == p.m_Name)
            return true;
        return false;
    }
    // 重载 != 号
    bool operator==(Person &p)
    {
        if (this->m_Age == p.m_Age && this->m_Name == p.m_Name)
            return false;
        return true;
    }
    string m_Name;
    int m_Age;
};


void test01() 
{
    Person p1("tom", 18);
    Person p2("tom", 18);
    if (p1 == p2)
        cout << "p1 和 p2 是相等的。" << endl;
    else
        cout << "p1 和 p2 是不相等的。" << endl;
} 
 
void test02() 
{

} 

int main()
{
    test01();
    // test02();
    // int a = 0;
    // cout << ++a << endl;
    cout << "hello" << endl;
    return 0;
}